
<?php
include ("../inc/config.inc.php");
include ("../inc/mysql.inc.php");
$link = connect();
$template['title'] = '字板块列表';
?>
<?php
include ("../admin/inc/header.inc.php");
?>
<div id="main" style="height:1000px;">
    <div class="title">字版块信息</div>
    <table class="list">
        <tr>
            <th>排序</th>
            <th>版块名称</th>
            <th>所属板块</th>
            <th>版主</th>
            <th>操作</th>
        </tr>
        <?php
        $query = "SELECT a.id,a.father_module_id,a.module_name,member_id,a.info,b.module_name as father_name FROM sfk_son_module a 
                INNER JOIN sfk_father_module b  ON a.father_module_id = b.id;";
        $result = execute($link,$query);
        while ($data = $result->fetch_assoc()) {
            ?>
            <tr>
                <td><input class="sort" type="text" name="sort" /></td>
                <td><?=$data["module_name"]?>(<?=$data["id"]?>)</td>
                <td><?=$data['father_name']?></td>
                <td>版主</td>
                <td>
                    <a href="#">[访问]</a>&nbsp;&nbsp;
                    <a href="son_module_update.php?id=<?=$data["id"]?>">[编辑]</a>&nbsp;&nbsp;
                    <a href="son_module_delete.php?id=<?=$data["id"]?>">[删除]</a></td>
            </tr>
            <?php
        }
        ?>
    </table>
    <input class="btn" type="submit" name="submit" value="排序" />
</div>
</body>
</html>
